{include file="common/header" title="公众号配置"}
{include file="common/crumb" subName="公众号配置" tabName="微信公众号"}

<div class="x-body">
    <div class="layui-tab layui-tab-brief" lay-filter="tabFilter">
        <ul class="layui-tab-title">
            <li class="layui-this">公众号配置</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form layui-form-pane" action="">
                    <div class="layui-form-item">
                        <label class="layui-form-label">API</label>
                        <div class="layui-input-block">
                            <input type="url" name="url" value="{$data['url']??''}" autocomplete="off" placeholder="请输入开发者接口地址" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">AppID</label>
                        <div class="layui-input-block">
                            <input type="text" name="appid" value="{$data['appid']??''}" autocomplete="off" placeholder="请输入开发者AppID" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">AppSecret</label>
                        <div class="layui-input-block">
                            <input type="text" name="appsecret" value="{$data['appsecret']??''}" autocomplete="off" placeholder="请输入开发者AppSecret" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">Token</label>
                        <div class="layui-input-block">
                            <input type="text" name="token" value="{$data['token']??''}" autocomplete="off" placeholder="请输入开发者Token" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">EncodingAesKey</label>
                        <div class="layui-input-block">
                            <input type="text" name="encodingaeskey" value="{$data['encodingaeskey']??''}" autocomplete="off" placeholder="请输入消息加解密密钥" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">关注欢迎语</label>
                        <div class="layui-input-block">
                            <input type="text" name="welcome" value="{$data['welcome']??''}" autocomplete="off" placeholder="请输入关注欢迎语" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit >更改配置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use(['upload','element','form'], function () {
        var $ = layui.jquery
            , upload = layui.upload
            , form = layui.form
            , element = layui.element;

        form.on('submit',function (data) {
            $.post('{:url("store")}',{data:data.field},function(res){
                layer.msg(res.msg,{time:1000},function(){
                    if (res.code === 0) {
                        location.reload();
                    }
                });
            });
            return false;
        })

    });
</script>
</body>

</html>